﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace StoreWeb.system.news
{
    public partial class edit : System.Web.UI.Page
    {
        //BLL.Role role = new BLL.Role();
        BLL.News news = new BLL.News();
        public string congtenstr;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //Bind();
                hidid.Value = Request.QueryString["id"];
                if (!string.IsNullOrEmpty(hidid.Value))
                {
                    Model.News ne = news.GetModel(Convert.ToInt32(hidid.Value));
                    newstitile.Value = ne.newstitile;
                    //newscontent.Value = ne.newscontent;
                    congtenstr = ne.newscontent;
                    //ddluser.SelectedValue = ne.showobject.ToString();
                    selsectname.Value = ne.username;
                    usernamehidden.Value = ne.userid;
                }
            }
        }

        //private void Bind()
        //{
        //    Maticsoft.BLL.UserAdmin message = new Maticsoft.BLL.UserAdmin();
        //    //加载用户
        //    ddluser.DataSource = message.GetList(" loginname!='admin' ");
        //    ddluser.DataTextField = "username";
        //    ddluser.DataValueField = "id";
        //    ddluser.DataBind();
        //    ddluser.Items.Insert(0, new ListItem { Value = "0", Text = "------所有经销商------" });

        //}

    }
}